# -*- coding: utf-8 -*-
from __future__ import print_function
import os, sys, pdb, shutil
import zipfile
from user.models import FileStore
from software.forms import softwareVersion_check, dataId_check, file_check
from django.http import JsonResponse
from software.models import SoftwareData, SoftwareVersion
from order.views.createOrder import random_str, orderNum
from conf.sysConfig import config
from user.dataCheck import DataCheck
from log.models import SoftwareLog

datacheck = DataCheck()
tmpDir = os.path.join(config["dataDir"], config["tmpDir"])


def createLog(option, softwareVersionId, userId):
    SoftwareLog.objects.create(
        user_id=userId,
        softwareVersion_id=softwareVersionId,
        operate=option
    )
